﻿@model Sealight.Core.DataAdapter.product
@{
    ViewBag.Title = "_ProductVariantForProduct";
}
<table class="adminContent" width="100%">
    <tbody>
        <tr>
            <td width="100%">
                <div>
                    <table class="tablestyle" cellspacing="0" rules="all" border="1" id="" style="width: 100%;
                        border-collapse: collapse;">
                        <tbody>
                            <tr class="headerstyle">
                                <th scope="col">
                                   Tên sản phẩm biến thể
                                </th>
                                <th align="center" scope="col">
                                    SKU
                                </th>
                                <th align="center" scope="col">
                                   Giá
                                </th>
                                <th align="center" scope="col">
                                   Số lượng
                                </th>
                                <th align="center" scope="col">
                                    Thứ tự hiển thị
                                </th>
                                <th align="center" scope="col">
                                    Published
                                </th>
                                <th align="center" scope="col">
                                   Xem
                                </th>
                            </tr>
                            @if (Model != null && Model.product_variants != null)
                            {
                                foreach (var variant in Model.product_variants)
                                {
                                <tr class="rowstyle">
                                    <td style="width: 35%;">
                                        @variant.name
                                    </td>
                                    <td align="center" style="width: 15%;">
                                        @variant.SKU
                                    </td>
                                    <td align="center" style="width: 10%;">
                                        @variant.price
                                    </td>
                                    <td align="center" style="width: 10%;">
                                        @variant.stock_quantity
                                    </td>
                                    <td align="center" style="width: 10%;">
                                        @variant.display_order
                                    </td>
                                    <td align="center" style="width: 10%;">
                                        <img id="" src="/content/images/checked.gif" alt="True" style="border-width: 0px;">
                                        <span style="display: none;">
                                            <input type="checkbox" checked="checked"/></span>
                                    </td>
                                    <td align="center" style="width: 10%;">
                                        <a href="/admin/Product/AddUpdateProductVariant/@variant.id" title="View">Xem</a>
                                    </td>
                                </tr>
                                }
                            }
                        </tbody>
                    </table>
                </div>
            </td>
        </tr>
    </tbody>
</table>
<p>
       <input type="button" onclick="location.href='/admin/product/AddUpdateProductVariant?productId=@Model.id'" value="Thêm mới"
        id="btnAddNew" class="adminButtonBlue" title="Thêm mới sản phẩm"/>
</p>
